package com.imooc.news_manager_project.dto;


import com.imooc.news_manager_project.common.validator.SaveValidator;
import com.imooc.news_manager_project.common.validator.UpdateValidator;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class NewsDTO {

    @NotBlank(message = "更新时不能为空", groups = {UpdateValidator.class})
    private String id;

    @NotBlank(message = "标题不能为空", groups = {SaveValidator.class, UpdateValidator.class})
    private String title;

    @NotBlank(message = "新闻内容不能为空", groups = {SaveValidator.class, UpdateValidator.class})
    private String content;

}
